home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / regnpckg.sit / editScript XFCN / cards.xml < prev    next >
Text File  |  1990-12-10  |  15KB  |  375 lines

  1. card_6220.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>6220</id>
  6.     <filler1>0</filler1>
  7.     <cantDelete> <false /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <owner>6439</owner>
  11.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  12.     <content>
  13.         <layer>background</layer>
  14.         <id>2</id>
  15.         <text><span class="style9">eading This Stack</span><span class="style1"></span><span class="style10">┼╕</span><span class="style1">┬á┬á┬á┬á┬áLeave stack and go (back) to the stack ΓÇ£Start HereΓÇ¥</span><span class="style10">ΓÇ║</span><span class="style1">┬á┬á┬á┬á┬á Go to next page, if mouse button held down will keep turning┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áthe pages. Right arrow key is linked</span><span class="style10">∩¼ü</span><span class="style1">┬á┬á┬á┬á┬á┬áAs above, but previous page. Left arrow key is linked.</span><span class="style11">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áClick to Continue</span></text>
  16.     </content>
  17.     <name>Help</name>
  18.     <script>on mouseUpvisual effect barn door closego to first cdend mouseUpon arrowKeyend arrowKeyon doMenuend doMenuon chooseend choose</script>
  19. </card>
  20.  
  21.  
  22. card_4353.xml
  23. <?xml version="1.0" encoding="utf-8" ?>
  24. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  25. <card>
  26.     <id>4353</id>
  27.     <filler1>0</filler1>
  28.     <cantDelete> <false /> </cantDelete>
  29.     <showPict> <true /> </showPict>
  30.     <dontSearch> <false /> </dontSearch>
  31.     <owner>2781</owner>
  32.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  33.     <content>
  34.         <layer>background</layer>
  35.         <id>3</id>
  36.         <text>Page 5 of 5</text>
  37.     </content>
  38.     <content>
  39.         <layer>background</layer>
  40.         <id>9</id>
  41.         <text>Drawbacks</text>
  42.     </content>
  43.     <content>
  44.         <layer>background</layer>
  45.         <id>2</id>
  46.         <text><span class="style1">urrently </span><span class="style12">editScript</span><span class="style1"> does not allow you to control whether the script editor will allow changes to the script. The script editor determines this itself by checking whether the stack is locked, scripts from locked stacks cannot be changed. The next version of </span><span class="style12">editScript</span><span class="style1"> will address this problem.</span></text>
  47.     </content>
  48.     <name></name>
  49.     <script></script>
  50. </card>
  51.  
  52.  
  53. card_4178.xml
  54. <?xml version="1.0" encoding="utf-8" ?>
  55. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  56. <card>
  57.     <id>4178</id>
  58.     <filler1>0</filler1>
  59.     <cantDelete> <false /> </cantDelete>
  60.     <showPict> <true /> </showPict>
  61.     <dontSearch> <false /> </dontSearch>
  62.     <owner>2781</owner>
  63.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  64.     <part>
  65.         <id>1</id>
  66.         <type>field</type>
  67.         <visible> <true /> </visible>
  68.         <dontWrap> <false /> </dontWrap>
  69.         <dontSearch> <false /> </dontSearch>
  70.         <sharedText> <false /> </sharedText>
  71.         <fixedLineHeight> <false /> </fixedLineHeight>
  72.         <autoTab> <false /> </autoTab>
  73.         <lockText> <true /> </lockText>
  74.         <rect>
  75.             <left>17</left>
  76.             <top>83</top>
  77.             <right>399</right>
  78.             <bottom>167</bottom>
  79.         </rect>
  80.         <style>shadow</style>
  81.         <autoSelect> <false /> </autoSelect>
  82.         <showLines> <false /> </showLines>
  83.         <wideMargins> <false /> </wideMargins>
  84.         <multipleLines> <false /> </multipleLines>
  85.         <reservedFamily> 0 </reservedFamily>
  86.         <titleWidth>0</titleWidth>
  87.         <icon>0</icon>
  88.         <textAlign>left</textAlign>
  89.         <font>Monaco</font>
  90.         <textSize>9</textSize>
  91.         <textStyle>plain</textStyle>
  92.         <textHeight>12</textHeight>
  93.         <name>box</name>
  94.         <script>on mouseUpif not editScript("cd fld box", "Shadow Box", ┬¼"put editResult into cd fld box")thenanswer "Sorry, not enough memory"end ifend mouseUp</script>
  95.     </part>
  96.     <content>
  97.         <layer>background</layer>
  98.         <id>3</id>
  99.         <text>Page 4 of 5</text>
  100.     </content>
  101.     <content>
  102.         <layer>background</layer>
  103.         <id>9</id>
  104.         <text>Example: Editing a Field</text>
  105.     </content>
  106.     <content>
  107.         <layer>background</layer>
  108.         <id>2</id>
  109.         <text><span class="style1">he field below is </span><span class="style12">locked</span><span class="style1">, clicking on it will call the script editor to edit its </span><span class="style12">contents</span><span class="style1">. The script used is:If you wish to be able to </span><span class="style12">change</span><span class="style1"> the contents of the box you must unlock this stack first, see next page for why.</span><span class="style13">  </span></text>
  110.     </content>
  111.     <content>
  112.         <layer>card</layer>
  113.         <id>1</id>
  114.         <text>on mouseUp  if not editScript("cd fld box", "Shadow Box", ┬¼                    "put editResult into cd fld box")  then    answer "Sorry, not enough memory"  end ifend mouseUp</text>
  115.     </content>
  116.     <name></name>
  117.     <script></script>
  118. </card>
  119.  
  120.  
  121. card_2516.xml
  122. <?xml version="1.0" encoding="utf-8" ?>
  123. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  124. <card>
  125.     <id>2516</id>
  126.     <filler1>0</filler1>
  127.     <cantDelete> <false /> </cantDelete>
  128.     <showPict> <true /> </showPict>
  129.     <dontSearch> <false /> </dontSearch>
  130.     <owner>2781</owner>
  131.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  132.     <content>
  133.         <layer>background</layer>
  134.         <id>3</id>
  135.         <text>Page 3 of 5</text>
  136.     </content>
  137.     <content>
  138.         <layer>background</layer>
  139.         <id>9</id>
  140.         <text><span class="style1">The </span><span class="style11">editScript</span><span class="style1"> XFCN</span></text>
  141.     </content>
  142.     <content>
  143.         <layer>background</layer>
  144.         <id>2</id>
  145.         <text><span class="style11">rguments (cont):</span><span class="style1">┬á┬á┬á┬á┬á</span><span class="style12">output expr</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áA </span><span class="style12">quoted</span><span class="style1"> expression which when evaluated will save the result┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áof the edit, which is found in the global variable </span><span class="style12">editResult</span><span class="style1">, to┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áthe appropriate place.</span><span class="style11">Return:</span><span class="style1"></span><span class="style12">┬á┬á┬á┬á┬áeditScript</span><span class="style1"> returns a boolean indicating whether it was able to call┬á┬á┬á┬á┬áthe script editor. If it returns </span><span class="style12">false</span><span class="style1"> the most probable cause is lack of┬á┬á┬á┬á┬ámemory, the script editor uses about 80K! Due to this large┬á┬á┬á┬á┬ámemory requirement </span><span class="style12">editScript</span><span class="style1"> will often fail </span><span class="style1">on 1Mb systems.</span></text>
  146.     </content>
  147.     <name></name>
  148.     <script></script>
  149. </card>
  150.  
  151.  
  152. card_2150.xml
  153. <?xml version="1.0" encoding="utf-8" ?>
  154. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  155. <card>
  156.     <id>2150</id>
  157.     <filler1>0</filler1>
  158.     <cantDelete> <false /> </cantDelete>
  159.     <showPict> <true /> </showPict>
  160.     <dontSearch> <false /> </dontSearch>
  161.     <owner>2781</owner>
  162.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  163.     <content>
  164.         <layer>background</layer>
  165.         <id>3</id>
  166.         <text>Page 2 of 5</text>
  167.     </content>
  168.     <content>
  169.         <layer>background</layer>
  170.         <id>9</id>
  171.         <text><span class="style1">he </span><span class="style11">editScript</span><span class="style1"> XFCN</span></text>
  172.     </content>
  173.     <content>
  174.         <layer>background</layer>
  175.         <id>2</id>
  176.         <text><span class="style11">unction:</span><span class="style1">┬á┬á┬á┬á┬áCall the HyperCard script editor to edit an arbitrary script</span><span class="style11">Syntax:</span><span class="style1"></span><span class="style13">┬á┬áeditScript(</span><span class="style14">input expr</span><span class="style13">, </span><span class="style14">title</span><span class="style13">, </span><span class="style14">output expr</span><span class="style13">) </span><span class="style14">returns boolean</span><span class="style11">Arguments:</span><span class="style1">┬á┬á┬á┬á┬á</span><span class="style12">input expr</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áA </span><span class="style12">quoted</span><span class="style1"> expression which when evaluated yeilds the text to be┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áedited.</span><span class="style12">┬á┬á┬á┬á┬átitle</span><span class="style1">┬á┬á┬á┬á┬á┬á┬á┬á┬á┬áA string to be used for the editors window title.</span></text>
  177.     </content>
  178.     <name></name>
  179.     <script></script>
  180. </card>
  181.  
  182.  
  183. card_2867.xml
  184. <?xml version="1.0" encoding="utf-8" ?>
  185. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  186. <card>
  187.     <id>2867</id>
  188.     <filler1>0</filler1>
  189.     <cantDelete> <false /> </cantDelete>
  190.     <showPict> <true /> </showPict>
  191.     <dontSearch> <false /> </dontSearch>
  192.     <owner>2781</owner>
  193.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  194.     <content>
  195.         <layer>background</layer>
  196.         <id>3</id>
  197.         <text>Page 1 of 5</text>
  198.     </content>
  199.     <content>
  200.         <layer>background</layer>
  201.         <id>2</id>
  202.         <text><span class="style1">yperCard 2 has a new powerful script editor which supports the editing of multiple scripts, search & replace etc. However, the script editor can only be used to edit the scripts of objects; it cannot be used to edit the contents of a field, the value of a variable etc.The </span><span class="style12">editScript</span><span class="style1"> XFCN described in this stack removes this restriction and allows very general use of the editor. </span><span class="style12">EditScript</span><span class="style1"> does not turn the script editor into a general editor, it just allows the source and destination of the script to be flexible.</span></text>
  203.     </content>
  204.     <content>
  205.         <layer>background</layer>
  206.         <id>9</id>
  207.         <text>Introduction</text>
  208.     </content>
  209.     <name></name>
  210.     <script></script>
  211. </card>
  212.  
  213.  
  214. card_5541.xml
  215. <?xml version="1.0" encoding="utf-8" ?>
  216. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  217. <card>
  218.     <id>5541</id>
  219.     <filler1>0</filler1>
  220.     <bitmap>BMAP_5763.pbm</bitmap>
  221.     <cantDelete> <false /> </cantDelete>
  222.     <showPict> <true /> </showPict>
  223.     <dontSearch> <false /> </dontSearch>
  224.     <owner>5304</owner>
  225.     <link rel="stylesheet" type="text/css" href="stylesheet_3160.css" />
  226.     <part>
  227.         <id>7</id>
  228.         <type>button</type>
  229.         <visible> <true /> </visible>
  230.         <reserved5> 0 </reserved5>
  231.         <reserved4> 0 </reserved4>
  232.         <reserved3> 0 </reserved3>
  233.         <reserved2> 0 </reserved2>
  234.         <reserved1> 0 </reserved1>
  235.         <enabled> <true /> </enabled>
  236.         <rect>
  237.             <left>232</left>
  238.             <top>180</top>
  239.             <right>268</right>
  240.             <bottom>210</bottom>
  241.         </rect>
  242.         <style>transparent</style>
  243.         <showName> <false /> </showName>
  244.         <highlight> <false /> </highlight>
  245.         <autoHighlight> <false /> </autoHighlight>
  246.         <sharedHighlight> <true /> </sharedHighlight>
  247.         <family>0</family>
  248.         <titleWidth>0</titleWidth>
  249.         <icon>26425</icon>
  250.         <textAlign>center</textAlign>
  251.         <font>Chicago</font>
  252.         <textSize>12</textSize>
  253.         <textStyle>plain</textStyle>
  254.         <name>Next</name>
  255.         <script>on mouseUpvisual effect wipe leftgo nextend mouseUp</script>
  256.     </part>
  257.     <part>
  258.         <id>8</id>
  259.         <type>button</type>
  260.         <visible> <true /> </visible>
  261.         <reserved5> 0 </reserved5>
  262.         <reserved4> 0 </reserved4>
  263.         <reserved3> 0 </reserved3>
  264.         <reserved2> 0 </reserved2>
  265.         <reserved1> 0 </reserved1>
  266.         <enabled> <true /> </enabled>
  267.         <rect>
  268.             <left>191</left>
  269.             <top>180</top>
  270.             <right>227</right>
  271.             <bottom>210</bottom>
  272.         </rect>
  273.         <style>transparent</style>
  274.         <showName> <false /> </showName>
  275.         <highlight> <false /> </highlight>
  276.         <autoHighlight> <false /> </autoHighlight>
  277.         <sharedHighlight> <true /> </sharedHighlight>
  278.         <family>0</family>
  279.         <titleWidth>0</titleWidth>
  280.         <icon>28023</icon>
  281.         <textAlign>center</textAlign>
  282.         <font>Chicago</font>
  283.         <textSize>12</textSize>
  284.         <textStyle>plain</textStyle>
  285.         <name>Intro</name>
  286.         <script>on mouseUpvisual effect dissolve to grayvisual effect dissolvego to stack "Start Here"end mouseUp</script>
  287.     </part>
  288.     <part>
  289.         <id>9</id>
  290.         <type>button</type>
  291.         <visible> <true /> </visible>
  292.         <reserved5> 0 </reserved5>
  293.         <reserved4> 0 </reserved4>
  294.         <reserved3> 0 </reserved3>
  295.         <reserved2> 0 </reserved2>
  296.         <reserved1> 0 </reserved1>
  297.         <enabled> <true /> </enabled>
  298.         <rect>
  299.             <left>150</left>
  300.             <top>180</top>
  301.             <right>186</right>
  302.             <bottom>210</bottom>
  303.         </rect>
  304.         <style>transparent</style>
  305.         <showName> <false /> </showName>
  306.         <highlight> <false /> </highlight>
  307.         <autoHighlight> <false /> </autoHighlight>
  308.         <sharedHighlight> <true /> </sharedHighlight>
  309.         <family>0</family>
  310.         <titleWidth>0</titleWidth>
  311.         <icon>1011</icon>
  312.         <textAlign>center</textAlign>
  313.         <font>Chicago</font>
  314.         <textSize>12</textSize>
  315.         <textStyle>plain</textStyle>
  316.         <name>Home</name>
  317.         <script>on mouseUpgo homeend mouseUp</script>
  318.     </part>
  319.     <part>
  320.         <id>11</id>
  321.         <type>button</type>
  322.         <visible> <true /> </visible>
  323.         <reserved5> 0 </reserved5>
  324.         <reserved4> 0 </reserved4>
  325.         <reserved3> 0 </reserved3>
  326.         <reserved2> 0 </reserved2>
  327.         <reserved1> 0 </reserved1>
  328.         <enabled> <true /> </enabled>
  329.         <rect>
  330.             <left>390</left>
  331.             <top>187</top>
  332.             <right>416</right>
  333.             <bottom>211</bottom>
  334.         </rect>
  335.         <style>opaque</style>
  336.         <showName> <false /> </showName>
  337.         <highlight> <false /> </highlight>
  338.         <autoHighlight> <false /> </autoHighlight>
  339.         <sharedHighlight> <true /> </sharedHighlight>
  340.         <family>0</family>
  341.         <titleWidth>0</titleWidth>
  342.         <icon>25002</icon>
  343.         <textAlign>center</textAlign>
  344.         <font>Chicago</font>
  345.         <textSize>12</textSize>
  346.         <textStyle>plain</textStyle>
  347.         <name>New Button</name>
  348.         <script>on mouseUpvisual effect barn door opengo cd "Help"end mouseUp</script>
  349.     </part>
  350.     <content>
  351.         <layer>background</layer>
  352.         <id>2</id>
  353.         <text>editScript XFCN</text>
  354.     </content>
  355.     <content>
  356.         <layer>background</layer>
  357.         <id>3</id>
  358.         <text><span class="style7">tack & Code Resources ┬⌐ 1990, Nigel PerryFree for personal use and for use in stacks & applications which are free, provided this copyright notice and conditions of use are clearly displayed. May not be used for commercial or profit-making purposes or in ShareWare without permission. Code resources written in THINK C ┬⌐ Symantec.</span></text>
  359.     </content>
  360.     <content>
  361.         <layer>background</layer>
  362.         <id>5</id>
  363.         <text>EditScript XFCN is an external function which enables the editing of variable values, field contents etc. as scripts using the standard HyperCard script editor.</text>
  364.     </content>
  365.     <content>
  366.         <layer>background</layer>
  367.         <id>6</id>
  368.         <text><span class="style1">igel Perry, Dept of Computing, Imperial College, 180 Queens Gate, London SW7, UKEmail: np@doc.ic.ac.uk</span><span class="style8"></span></text>
  369.     </content>
  370.     <name></name>
  371.     <script>on arrowKey whichif which is "Right" thensend mouseUp to btn "Next"elseif which is not "Left" thenpass arrowKeyend ifend ifend arrowKey</script>
  372. </card>
  373.  
  374.  
  375.